﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Helper;
using CoreData;

namespace SchoolManagementSystem.Report._4._Kho
{
    public class PrintData
    {
        /// <summary>
        /// Lay du lieu in phieu nhap
        /// </summary>
        /// <param name="_ID"></param>
        /// <returns></returns>
        public static DataTable GetDataPrintFrom_VoucherIn(long _ID)
        {
            DataTable dt = new DataTable();
            var data = RegisterService.RegisterServices.StockVoucherInDetailService.GetListVIDByPID(_ID);
            if (data == null)
            {
                data = new List<Stock_VoucherInDetail>();
            }
            var l = new KList<CoreData.Stock_VoucherIn>();
            dt = l.ConvertToDataTable(data);
            return dt;
        }
        public static DataTable GetDataPrintFrom_VoucherOut(long _ID)
        {
            DataTable dt = new DataTable();
            var data = RegisterService.RegisterServices.StockVoucherOutDetailService.GetListVODByPID(_ID);
            if (data == null)
            {
                data = new List<Stock_VoucherOutDetail>();
            }
            var l = new KList<CoreData.Stock_VoucherOut>();
            dt = l.ConvertToDataTable(data);
            return dt;
        }
    }
}
